<?php
require_once 'inc/mysql.inc.php';
require_once 'inc/changePerson.php';

include "inc/header_empty.html";
include("inc/header_loggedin.php");

$pinfo = $_SESSION['pinfo'];
$granty = $pinfo['granty'];



?>

<!-- Datedit by Ivo Skalicky - ITPro CZ - http://www.itpro.cz -->
<link rel="stylesheet" href="datedit/datedit.css" type="text/css" media="screen" />
<script type="text/javascript" charset="iso-8859-1" src="datedit/datedit.js"></script>
<script type="text/javascript" charset="utf-8" src="datedit/lang/cz.js"></script>


<script type="text/javascript">
  datedit("datum_od","d.m.yyyy");
  datedit("datum_do","d.m.yyyy");
</script>

Nová služební cesta<br>

<form name="NovaUdalost" method="POST" action="vogoni.php">
    <input type="hidden" name="TypDat" value="NovaUdalost">
    <input type="hidden" name="typ_udalosti" value="2">
         <?php        
        /*if ( ! ImIAdmin()) 
            printf('<input type="hidden" name="clovek" value="%s" >', $pinfo['id']);
         * */
        ?> 
    
    <table  class="inputFormTable">
        <?php        
        /*
        if (ImIAdmin()) {
            print('<tr><td>Kdo:</td>'
                .'<td><select name="clovek">');
            GenerateChangePersonMenuItems();
            print('</select></td></tr>');             
        } 
         * 
         */
        ?>      
        <tr><td class="inputRequired">Od:</td><td><input type="text" id="datum_od" name="datum_od" /> <!--onblur="check_date(this)"--> </td></tr>
        <tr><td class="inputRequired">Do:</td><td><input type="text" id="datum_do" name="datum_do" /> <!--onblur="check_date(this)"--> </td>
        <tr><td class="inputRequired">Granty:</td><td>

                <?php
                    echo '<input type="radio" name="NovaUdalost_Granty[]" value="0" checked="checked">Bez grantu </input>&nbsp;&nbsp;&nbsp;&nbsp;'; // 0 means no grant
                    foreach ($granty as $g) { 
                        echo '<input type=radio name=NovaUdalost_Granty[] value='.$g['project'].'>';
                        echo $g['Name'];
                        echo '</input>&nbsp;&nbsp;&nbsp;';
                    }
                    ?>      
                
        </td></tr>
        <tr><td>Účel jednání:</td><td colspan="3"><input type="text" name="ucel"  size="80"  /></td></tr>
        <tr>
            <td>Místo jednání:</td><td><input type="text" name="mesto"  size="45"  /></td>
            <td>Stát:</td><td><input type="text" name="stat"  size="25" value="ČR" /></td>
        </tr>
        <tr><td>Poznámka:</td><td colspan="3"><input type="text" name="poznamka" size="80" /></td></tr>              
    </table>
    
    
   
    <input type="submit" name="form_action_Udalosti" value="Vytvořit" />
    <input type="submit" name="form_action_Udalosti" value="Nevytvářet" onclick="form.action='vogoni.php';">
</form>





<?php
include("inc/footer.html");
?>
